<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%@include file="/common/common.jsp" %>

    <script type="application/javascript">
        function deleteItem(paramId) {
            $.post("/xunjia/delete",{id:paramId},function(data){
                //{"success":false,"msg":"登录失败，请检查你的输入的密码！"}
                if(data.success){
                    //跳转到主页
                   alert("删除成功");

                }
            },"json");
        }
    </script>
</head>
<body>
i am xunjia jsp
<table>
    <tr>
        <th>id</th>
        <th>chepai</th>
        <th>danhao</th>
        <th>chanpin</th>
        <th>操作</th>
    </tr>
    <c:forEach var="item" items="${items}">
        <tr>
            <td>  ${item.id}</td>
            <td>  ${item.chepai}</td>
            <td>  ${item.danhao}</td>
            <td>  ${item.chanpin}</td>
            <td> <a href="javascript:deleteItem('${item.id}')"> 删除 </a>  </td>
        </tr>

    </c:forEach>

</table>

</body>
</html>